﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace IDotNet.MapLibs.Web
{
    /// <summary>
    /// 调用选择地图所需参数
    /// </summary>
    public class SelectMapReqModel
    {
        private string _mapCity = "深圳";
        /// <summary>
        /// 地图初始化城市
        /// </summary>
        public string MapCity
        {
            get { return _mapCity; }
            set { _mapCity = value; }
        }



        private int mapZoom = 15;
        /// <summary>
        /// 地图缩放级别（默认为15）
        /// </summary>
        public int MapZoom
        {
            get { return mapZoom; }
            set { mapZoom = value; }
        }


        /// <summary>
        /// 选择点之后跳转的页面
        /// </summary>
        public string ReturnUrl { get; set; }

        /// <summary>
        /// 所有点信息
        /// </summary>
        public List<SelectMapItemModel> MapData { get; set; }


        private string _selectBtnText = "选择";
        /// <summary>
        /// 选择地图按钮的文本
        /// </summary>
        public string SelectBtnText
        {
            get { return _selectBtnText; }
            set { _selectBtnText = value; }
        }

        /// <summary>
        /// 调用方式（0:Web调用； 1：WinForm调用）
        /// </summary>
        public int FromType { get; set; }

        /// <summary>
        /// 当前用户坐标（如果不传则会调用百度地图定位）
        /// </summary>
        public PointModel CurUserLocation { get; set; }

        /// <summary>
        /// 如果没有传CurUserLocation，则根据此解析当前位置
        /// </summary>
        public string UserAddress { get; set; }

        /// <summary>
        /// 当前用户坐标类型()
        /// </summary>
        public MapFromType CurUserLocMapFromType { get; set; }

    }

    /// <summary>
    /// 点信息
    /// </summary>
    public class SelectMapItemModel : PointModel
    {
        /// <summary>
        /// 地图点标识，选择后会回传此参数
        /// </summary>
        public string Id { get; set; }


        /// <summary>
        /// 用户点击点后弹出页面的信息（支持HTML）
        /// </summary>
        public string InfoWindowMsg { get; set; }



    }
}